const http = require('http')

const server = http.createServer((req, res) => {
  const body = 'Hello world'
  res.setHeader('Content-Length', Buffer.byteLength(body))
  res.setHeader('Content-Type', 'text/plain')
  res.end(body)
})
server.listen(3000, () => {
  console.log('HTTP server running in port: 3000')
})
